using Red.Controls.ViewModels;
using Metro = MahApps.Metro.Controls;

namespace Red.Controls
{
    /// <summary>
    /// Interaction logic for PreviewOptionsFlyout.xaml
    /// </summary>
    public partial class PreviewOptionsFlyout : Metro.Flyout
    {
        #region C-tor

        public PreviewOptionsFlyout()
        {
            InitializeComponent();
        }

        #endregion C-tor

        #region Event Handlers

        private async void ResetInputSettingsButton_Click( object sender, System.Windows.RoutedEventArgs e )
        {
            if ( DataContext != null )
            {
                DataItem item = DataContext as DataItem;
                var subItem = await item.DigUpSubItemAsync( "window.camera" );
                await subItem.ExecuteAsync( "reset" );
                await subItem.RefreshAsync();
            }
        }
        #endregion
    }
}
